-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: redshift data driver #18
Conversation
@@ -8,9 +8,9 @@ | |||
"_integer": 1, | |||
"_smallint": 1, | |||
"_bigint": 1, | |||
"_real": 1.1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: redshift-data driver returns some imprecise value, e.g. 1.10000000034
"_float": 1.1, | ||
"_float4": 1.1, | ||
"_float4": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: redshift-data driver returns some imprecise value, e.g. 1.10000000034
@@ -44,6 +44,10 @@ func jsonRowMapper(databaseTypeName string, value any) any { | |||
if n, err := strconv.ParseFloat(string(v), 64); err == nil { | |||
return n | |||
} | |||
case string: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: redshift-data driver returns NUMERIC
data types as string
instead of []byte
dest[i] = nil | ||
case *types.FieldMemberStringValue: | ||
switch { | ||
case strings.EqualFold(*rows.page.ColumnMetadata[i].TypeName, "timestamp"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: to be compatible with the behaviour of pg driver, we need to:
- Parse the string into a time
- Convert the time to UTC and parse it as an RFC3339 string.
029e9d3
to
606462d
Compare
c4a38b3
to
b6f691a
Compare
d0b611e
to
2073245
Compare
2073245
to
63020ec
Compare
63020ec
to
1eadb3e
Compare
307c3e5
to
a878fda
Compare
a878fda
to
92b401f
Compare
Description
Including the option to use an alternative sql driver for redshift, based on the Redshift Data API Service.
Credentials example for using the new
redshift-data
driver:Credentials example for using the original
postgres
driver:The
sqlconnect.DB
interface's behaviour remains the same regardless which driver is being used, in terms of:However, differences shall be expected by clients in the following:
ExecContext
operations are allowed in the context of an ongoing transaction, notQueryContext
.Security